from pprint import pprint
from paddlenlp import Taskflow
import paddle

# paddle.device.set_device("gpu:3")
def ie(info: str, schema):
    print(info, schema)
    taskflow = Taskflow('information_extraction', schema=schema, model="uie-base")
    res = taskflow(info)
    return res
